package com.youlu.campus.service.qa;

import com.youlu.campus.entity.UserPO;
import com.youlu.campus.entity.VO.res.ActivityPlusUserQaRes;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class ActivityH5ContestQaService {

    @Autowired
    private UserQaInfoService userQaInfoService;

    /**
     * 根据活动Id获取活动相关专业组竞赛答题、非专业组竞赛答题
     * @param currentUser
     * @param activityId 活动Id
     * @param contestQaType 1、非专业组竞赛 2、专业组竞赛
     * @return
     */
   public ActivityPlusUserQaRes getH5QaContestInfo(UserPO currentUser, String activityId, Integer contestQaType){
       log.info("【题库主页】activityId -> {} | contestQaType- > {} userId- > {}",activityId,contestQaType,currentUser.getId());
       return userQaInfoService.findUserQaInfoByUserIdAndActivityId(currentUser,contestQaType,activityId);
    }
}
